<?php 
include('includes/dbconnection.php');
$q=$_GET["q"];
 
 $qry ="SELECT z.zone_name,c.city_id,c.city_name,c.active_status FROM city c INNER JOIN zone z ON z.id=c.zone_id 
						where z.id='".$q."' order by c.city_id desc";
$res = mysql_query($qry);


if(mysql_num_rows($res)>0)
	 {
		 while($data=mysql_fetch_array($res)) 
		{
			$city ='<option value="'.$data['city_id'].'" selected>'.$data['city_name'].'</option>';
	    echo $city;	
		}
		
	}
	else
	{
	    $city	='<option value="No Data Found">No Data Found</option>';
		echo $city;	
	}
 
?> 
	